﻿@model Models.Models.ChangePassword
@using WebApp.Classes

@{
    ViewBag.Title = "Change Password";
}
    @using (Ajax.BeginForm("ChangePassword", "Account", null, new AjaxOptions() { HttpMethod = "POST" }, new { @class = "form-horizontal" }))
    {       
        <fieldset>
            @Html.GetTitle("/Images/glyphicons/png/glyphicons_240_rotation_lock.png", new string[] { HttpContext.Current.Request.RequestContext.RouteData.Values["controller"].ToString() + "/" + ViewBag.Title })

            <div id="divResult">
                <div class="alert alert-info">
                    Please provide old and new passwords along with security answer.
                </div>

                @Html.ValidationSummary()
                @Html.HiddenFor(m => m.UserID)

                <div class="control-group">    
                    <label class="control-label" for="input01">@Html.LabelFor(m => m.OldPassword)</label>
                    <div class="controls">@Html.PasswordFor(m => m.OldPassword)</div>
                </div>

                <div class="control-group">    
                    <label class="control-label" for="input01">@Html.LabelFor(m => m.NewPassword)</label>
                    <div class="controls">@Html.PasswordFor(m => m.NewPassword)</div>
                </div>

                <div class="control-group">    
                    <label class="control-label" for="input01">@Html.LabelFor(m => m.ConfirmPassword)</label>
                    <div class="controls">@Html.PasswordFor(m => m.ConfirmPassword)</div>
                </div>

                <div class="control-group">    
                    <label class="control-label" for="input01">@Html.LabelFor(m => m.SecureQuestion)</label>
                    <div class="controls">@Html.TextBoxFor(m => m.SecureQuestion, new { @class = "input-xxlarge" })</div>
                </div>

                <div class="control-group">    
                    <label class="control-label" for="input01">@Html.LabelFor(m => m.SecureAnswer)</label>
                    <div class="controls">@Html.TextBoxFor(m => m.SecureAnswer, new { @class = "input-xxlarge" })</div>
                </div>

                <div class="controls">    
                    <button type="submit" class="btn btn-inverse"><i class="icon-ok icon-white"></i> Change</button>            
                </div>    
            </div>

        </fieldset>
    }

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
